package com.phms.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * 监听器实现类
 */
public class ListenerTest implements ServletContextListener {
    /**
     * 日志记录
     */
    private final Logger logger = LoggerFactory.getLogger(ListenerTest.class);

    /**
     * 监听器初始化
     */
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        logger.info("-------监听器初始化-------");
    }

    /**
     * 销毁监听器
     */
    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        logger.info("-------销毁监听器-------");
    }
}
